From: Keir Fraser Date: Tue, 15 Jul 2008 15:13:46 +0000 (+0100) Subject: xen: Small cleanups towards allowing stricter compile warnings. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14188^2~18 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=cd99b8bf59292e3359dc65e32944226181792998;p=xen.git xen: Small cleanups towards allowing stricter compile warnings. Signed-off-by: Christoph Egger --- diff --git a/xen/common/sched_sedf.c b/xen/common/sched_sedf.c index 8a1223a03b..7b4eafb632 100644 --- a/xen/common/sched_sedf.c +++ b/xen/common/sched_sedf.c @@ -287,18 +287,18 @@ static inline void list_insert_sort( list_add(element, cur->prev); } -#define DOMAIN_COMPARER(name, field, comp1, comp2) \ -int name##_comp(struct list_head* el1, struct list_head* el2) \ -{ \ - struct sedf_vcpu_info *d1, *d2; \ - d1 = list_entry(el1,struct sedf_vcpu_info, field); \ - d2 = list_entry(el2,struct sedf_vcpu_info, field); \ - if ( (comp1) == (comp2) ) \ - return 0; \ - if ( (comp1) < (comp2) ) \ - return -1; \ - else \ - return 1; \ +#define DOMAIN_COMPARER(name, field, comp1, comp2) \ +static int name##_comp(struct list_head* el1, struct list_head* el2) \ +{ \ + struct sedf_vcpu_info *d1, *d2; \ + d1 = list_entry(el1,struct sedf_vcpu_info, field); \ + d2 = list_entry(el2,struct sedf_vcpu_info, field); \ + if ( (comp1) == (comp2) ) \ + return 0; \ + if ( (comp1) < (comp2) ) \ + return -1; \ + else \ + return 1; \ } /* adds a domain to the queue of processes which wait for the beginning of the @@ -1067,7 +1067,7 @@ static inline int should_switch(struct vcpu *cur, return 1; } -void sedf_wake(struct vcpu *d) +static void sedf_wake(struct vcpu *d) { s_time_t now = NOW(); struct sedf_vcpu_info* inf = EDOM_INFO(d); diff --git a/xen/common/stop_machine.c b/xen/common/stop_machine.c index 1411b9f197..f7d9071b66 100644 --- a/xen/common/stop_machine.c +++ b/xen/common/stop_machine.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/version.c b/xen/common/version.c index 6afa128cd0..b152e27c68 100644 --- a/xen/common/version.c +++ b/xen/common/version.c @@ -1,4 +1,5 @@ #include +#include const char *xen_compile_date(void) { diff --git a/xen/drivers/acpi/reboot.c b/xen/drivers/acpi/reboot.c index ae03526f17..95edc1eb32 100644 --- a/xen/drivers/acpi/reboot.c +++ b/xen/drivers/acpi/reboot.c @@ -1,5 +1,6 @@ #include #include +#include #include void acpi_reboot(void) diff --git a/xen/drivers/passthrough/amd/iommu_intr.c b/xen/drivers/passthrough/amd/iommu_intr.c index 5dfdff084e..ef31c5dd6e 100644 --- a/xen/drivers/passthrough/amd/iommu_intr.c +++ b/xen/drivers/passthrough/amd/iommu_intr.c @@ -25,7 +25,7 @@ DEFINE_SPINLOCK(int_remap_table_lock); void *int_remap_table = NULL; -u8* get_intremap_entry(u8 vector, u8 dm) +static u8 *get_intremap_entry(u8 vector, u8 dm) { u8 *table; int offset = 0;